package com.zj.config;

import com.example.conf.AppleConf;
import com.example.conf.FruitConf;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.core.annotation.Order;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.servlet.Servlet;


@ConditionalOnWebApplication(        type = ConditionalOnWebApplication.Type.SERVLET)
@ConditionalOnClass({Servlet.class, DispatcherServlet.class, WebMvcConfigurer.class})
@ConditionalOnMissingBean(FruitConf.class)
@AutoConfigureOrder(-2147413638)
public class Configure1 {

    public static  int idd=1;


    @Configuration
    @Import({ConfigInner2.class})
    @Order(1)
    public static class ConfigInnerAdapter1{
        public static  int idd=11;
    }

    @Configuration
    public static class ConfigInner2 extends AppleConf {
        public static  int idd=12;
    }
}
